﻿Imports System.Data.OleDb
Public Class discover
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        displayArticles()
    End Sub
    Sub displayArticles()
        Dim conn As New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("BookMeetConnString").ConnectionString)
        conn.Open()
        Dim cmd As New OleDbCommand("SELECT * FROM [UserArticles] ORDER BY DateOfPost DESC", conn)
        articleList.DataSource = cmd.ExecuteReader()
        articleList.DataBind()
        conn.Close()
    End Sub
End Class